<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title><?php echo $site_configs['site_name']; ?></title>

    <link href="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>themes/default/style.css" rel="stylesheet" type="text/css" media="screen"/>
    <link href="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>themes/css/core.css" rel="stylesheet" type="text/css" media="screen"/>
    <link href="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>themes/css/print.css" rel="stylesheet" type="text/css" media="print"/>
    <link href="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>uploadify/css/uploadify.css" rel="stylesheet" type="text/css" media="screen"/>
    <!--[if IE]>
    <link href="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>themes/css/ieHack.css" rel="stylesheet" type="text/css" media="screen"/>
    <![endif]-->

    <!--[if lte IE 9]>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/speedup.js" type="text/javascript"></script>
    <![endif]-->

    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/jquery-1.7.2.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/jquery.cookie.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/jquery.validate.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/jquery.bgiframe.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>xheditor/xheditor-1.1.14-zh-cn.min.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>uploadify/scripts/jquery.uploadify.js" type="text/javascript"></script>

    <!-- svg图表  supports Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 9.5+ and Internet Explorer 6.0+ -->
    <script type="text/javascript" src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>chart/raphael.js"></script>
    <script type="text/javascript" src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>chart/g.raphael.js"></script>
    <script type="text/javascript" src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>chart/g.bar.js"></script>
    <script type="text/javascript" src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>chart/g.line.js"></script>
    <script type="text/javascript" src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>chart/g.pie.js"></script>
    <script type="text/javascript" src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>chart/g.dot.js"></script>

    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.core.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.util.date.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.validate.method.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.regional.zh.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.barDrag.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.drag.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.tree.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.accordion.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.ui.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.theme.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.switchEnv.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.alertMsg.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.contextmenu.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.navTab.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.tab.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.resize.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.dialog.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.dialogDrag.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.sortDrag.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.cssTable.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.stable.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.taskBar.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.ajax.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.pagination.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.database.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.datepicker.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.effects.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.panel.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.checkbox.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.history.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.combox.js" type="text/javascript"></script>
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.print.js" type="text/javascript"></script>
    <!--
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>bin/dwz.min.js" type="text/javascript"></script>
    -->
    <script src="<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>js/dwz.regional.zh.js" type="text/javascript"></script>

    <script type="text/javascript">
        function closePM(){
            $.cookie('program_maxim',1,{path: '/',expires:1,domain: '<?php echo COOKIE_DOMAIN; ?>'});
            return true;
        }

        $(function(){
            DWZ.init("<?php echo SITE_URL.$site_configs['dwz_dir'].'/'; ?>dwz.frag.xml", {
                loginUrl:"login_dialog.html", loginTitle:"登录",	// 弹出登录对话框
                //loginUrl:"login.html",	// 跳到登录页面
                statusCode:{ok:200, error:300, timeout:301}, //【可选】
                pageInfo:{pageNum:"pageNum", numPerPage:"numPerPage", orderField:"orderField", orderDirection:"orderDirection"}, //【可选】
                debug:true,	// 调试模式 【true|false】
                callback:function(){
                    initEnv();
                    $("#themeList").theme({themeBase:"<?php echo site_url('dwz1.4.5/themes');?>"});// themeBase 相对于index页面的主题base路径
                    //navTab.openTab('main', '<?php //echo site_url('main.php')?>',{title:'我的主页'});
                    if($.cookie('program_maxim') != 1){
                        //$.pdialog.open('<?php echo site_url('program_maxim.php')?>', 'program_maxim', '今天你做到了吗？', {close:closePM});
                    }
                }
            });
        });

    </script>
</head>

<body scroll="no">
<div id="layout">
<div id="header">
    <div class="headerNav">
        <a class="logo" href="http://j-ui.com">标志</a>
        <ul class="nav">
            <li><a href="<?php echo site_url('main.php')?>" target="navTab" rel="main">我的主页</a></li>
            <li id="switchEnvBox"><a href="javascript:void(0)"><?php echo $user_info['user_name']?></a>
                <ul>
                    <?php foreach($user_roles as $v){?>
                        <li><?php echo $v['role_name'];?></li>
                    <?php }?>
                </ul>
            </li>
            <li><a href="<?php echo site_url('/index.php?m=user'); ?>&a=edituser&user_id=<?php echo $user_info['user_id']?>&editrole=0" target="dialog" height="350" rel="edit_user">设置</a></li>
            <li><a href="<?php echo site_url('logout.php');?>">退出</a></li>
        </ul>
        <ul class="themeList" id="themeList">
            <li theme="default"><div class="selected">蓝色</div></li>
            <li theme="green"><div>绿色</div></li>
            <!--<li theme="red"><div>红色</div></li>-->
            <li theme="purple"><div>紫色</div></li>
            <li theme="silver"><div>银色</div></li>
            <li theme="azure"><div>天蓝</div></li>
        </ul>
    </div>

    <!-- navMenu -->

</div>

<div id="leftside">
    <div id="sidebar_s">
        <div class="collapse">
            <div class="toggleCollapse"><div></div></div>
        </div>
    </div>
    <div id="sidebar">
        <div class="toggleCollapse"><h2>主菜单</h2><div>收缩</div></div>
        <?php
        function getTree($data,$user_cate_ids)
        {
            $html = '';
            foreach($data as $k => $v)
            {
                if(in_array($v['cate_id'],$user_cate_ids) && $v['is_show']){
                    if(isset($v['cate_child']))
                    {   //父亲找到儿子
                        $html .= '<li><a>'.$v['cate_name'].'</a>';
                        $html .= getTree($v['cate_child'],$user_cate_ids);
                        $html .= '</li>';
                    }else{
                        $path_info = pathinfo($v['action']);
                        $html .= '<li><a href="'.site_url('index.php?m='.$v['action']).'" target="navTab" rel="'.$path_info['filename'].'">'.$v['cate_name'].'</a></li>';
                    }
                }
            }
            return '<ul>'.$html.'</ul>';
        }

        $parent_array = array();//记录每一个父节点的地址引用
        $tree_array = array();//整颗树的数组

        foreach($menu_arr as $v){

            $node_num = ($v['right_value']-$v['left_value'] - 1)/2;

            if($v['parent_cate_id']){//如果没有parent_cate_id则是顶层

                $parent_array[$v['parent_cate_id']]['cate_child'][$v['cate_id']] = $v;

                if($node_num > 0){

                    $parent_array[$v['cate_id']] = &$parent_array[$v['parent_cate_id']]['cate_child'][$v['cate_id']];
                }

            }else{
                $tree_array[$v['cate_id']] = $v;

                if($node_num > 0){

                    $parent_array[$v['cate_id']] = &$tree_array[$v['cate_id']];
                }
            }
        }
        ?>
        <div class="accordion" fillSpace="sidebar">
            <?php foreach($tree_array as $value){
                if(in_array($value['cate_id'],$user_cate_ids) && $value['is_show']){
                    ?>
                    <div class="accordionHeader">
                        <h2><span>Folder</span><?php echo $value['cate_name'];?></h2>
                    </div>
                    <div class="accordionContent">
                        <ul class="tree treeFolder">
                            <?php if($value['cate_child']) echo substr(substr(getTree($value['cate_child'],$user_cate_ids),4),0,-5);?>
                        </ul>
                    </div>
                <?php }}?>
        </div>
    </div>
</div>
<div id="container">
    <div id="navTab" class="tabsPage">
        <div class="tabsPageHeader">
            <div class="tabsPageHeaderContent"><!-- 显示左右控制时添加 class="tabsPageHeaderMargin" -->
                <ul class="navTab-tab">
                    <li tabid="main" class="main"><a href="javascript:;"><span><span class="home_icon">我的主页</span></span></a></li>
                </ul>
            </div>
            <div class="tabsLeft">left</div><!-- 禁用只需要添加一个样式 class="tabsLeft tabsLeftDisabled" -->
            <div class="tabsRight">right</div><!-- 禁用只需要添加一个样式 class="tabsRight tabsRightDisabled" -->
            <div class="tabsMore">more</div>
        </div>
        <ul class="tabsMoreList">
            <li><a href="javascript:;">我的主页</a></li>
        </ul>
        <div class="navTab-panel tabsPageContent layoutBox">
            <div class="page unitBox">
                <div class="accountInfo">
                    <div class="alertInfo">
                        <h2><a href="doc/dwz-user-guide.pdf" target="_blank">DWZ框架使用手册(PDF)</a></h2>
                        <a href="doc/dwz-user-guide.swf" target="_blank">DWZ框架演示视频</a>
                    </div>
                    <div class="right">
                        <p><a href="doc/dwz-user-guide.zip" target="_blank" style="line-height:19px">DWZ框架使用手册(CHM)</a></p>
                        <p><a href="doc/dwz-ajax-develop.swf" target="_blank" style="line-height:19px">DWZ框架Ajax开发视频教材</a></p>
                    </div>
                    <p><span>DWZ富客户端框架</span></p>
                    <p>DWZ官方微博:<a href="http://weibo.com/dwzui" target="_blank">http://weibo.com/dwzui</a></p>
                </div>
                <div class="pageFormContent" layoutH="80" style="margin-right:230px">

                    <p style="color:red">DWZ官方微博 <a href="http://weibo.com/dwzui" target="_blank">http://weibo.com/dwzui</a></p>
                    <p style="color:red">DWZ官方微群 <a href="http://q.weibo.com/587328/invitation=11TGXSt-148c2" target="_blank">http://q.weibo.com/587328/invitation=11TGXSt-148c2</a></p>

                    <div class="divider"></div>
                    <h2>dwz v1.2视频教程:</h2>
                    <p><a href="http://www.u-training.com/thread-57-1-1.html" target="_blank">http://www.u-training.com/thread-57-1-1.html</a></p>

                    <div class="divider"></div>
                    <h2>DWZ系列开源项目:</h2>
                    <div class="unit"><a href="http://code.google.com/p/dwz/" target="_blank">dwz富客户端框架 - jUI</a></div>
                    <div class="unit"><a href="http://code.google.com/p/dwz4j" target="_blank">dwz4j(Java Web)快速开发框架 + jUI整合应用</a></div>
                    <div class="unit"><a href="http://code.google.com/p/dwz4php" target="_blank">ThinkPHP + jUI整合应用</a></div>
                    <div class="unit"><a href="http://code.google.com/p/dwz4php" target="_blank">Zend Framework + jUI整合应用</a></div>
                    <div class="unit"><a href="http://www.yiiframework.com/extension/dwzinterface/" target="_blank">YII + jUI整合应用</a></div>

                    <div class="divider"></div>
                    <h2>常见问题及解决:</h2>
<pre style="margin:5px;line-height:1.4em">
Error loading XML document: dwz.frag.xml
直接用IE打开index.html弹出一个对话框：Error loading XML document: dwz.frag.xml
原因：没有加载成功dwz.frag.xml。IE ajax laod本地文件有限制, 是ie安全级别的问题, 不是框架的问题。
解决方法：部署到apache 等 Web容器下。
</pre>

                    <div class="divider"></div>
                    <h2>有偿服务请联系:</h2>
<pre style="margin:5px;line-height:1.4em;">
定制化开发，公司培训，技术支持
合作电话：010-52897073
邮箱：support@dwzjs.com
</pre>
                </div>

                <div style="width:230px;position: absolute;top:60px;right:0" layoutH="80">
                    <iframe width="100%" height="430" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?width=0&height=430&fansRow=2&ptype=1&skin=1&isTitle=0&noborder=1&isWeibo=1&isFans=0&uid=1739071261&verifier=c683dfe7"></iframe>
                </div>
            </div>

        </div>
    </div>
</div>

</div>

<div id="footer"><?php echo $site_configs['copy_right']; ?></div>
</body>
</html>